package cn.ggcms.cms.dao.impl;

import java.util.List;

import cn.ggcms.cms.dao.TitleTypeDao;
import cn.ggcms.cms.utils.SimpleDao;
import cn.ggcms.cms.vo.TitleType;

public class TitleTypeImpl extends SimpleDao<TitleType> implements TitleTypeDao {

	public boolean doInsertTitleType(TitleType TitleType) {
		boolean flag = false;
		try {
			 super.save(TitleType);
			flag = true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flag;
	}
	public TitleType findTitleType(TitleType TitleType) {
		return TitleType;
		
	}
	public TitleType finTitleTypeById(int id) {
		return (TitleType) super.find(TitleType.class,id);
	}
	public List<TitleType> finTitleTypes() {

		return super.find(TitleType.class);
	}
	public boolean doDeleteTitleTypeById(int id) {
		boolean flag = false;
		try {
			super.delete(TitleType.class, id);
			flag = true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flag;
		
		
	}

}
